// 节点类型枚举
export enum NodeType {
  IP = 'ip',
  DOMAIN = 'domain',
  FILE = 'file'
}

// 风险等级枚举
export enum RiskLevel {
  HIGH = 'high',
  MEDIUM = 'medium',
  LOW = 'low',
  UNKNOWN = 'unknown'
}

// 节点基本属性接口
export interface NodeBaseValue {
  type: NodeType;
  risk: RiskLevel;
  description: string;
}

// IP节点属性接口
export interface IPNodeValue extends NodeBaseValue {
  type: NodeType.IP;
  location: string;
  firstSeen: string;
  lastSeen: string;
}

// 域名节点属性接口
export interface DomainNodeValue extends NodeBaseValue {
  type: NodeType.DOMAIN;
  registrar: string;
  created: string;
  expires: string;
}

// 文件节点属性接口
export interface FileNodeValue extends NodeBaseValue {
  type: NodeType.FILE;
  fileType: string;
  size: string;
  detection: string;
}

// 节点值类型（联合类型）
export type NodeValue = IPNodeValue | DomainNodeValue | FileNodeValue;

// 节点接口
export interface Node {
  id: string;
  name: string;
  category: number;
  symbolSize: number;
  value: NodeValue;
}

// 关系接口
export interface Relation {
  source: string;
  target: string;
  value: string;
  lineStyle?: {
    width?: number;
    color?: string;
    type?: 'solid' | 'dashed' | 'dotted';
    curveness?: number;
  };
}

// 攻击路径数据接口
export interface AttackPathData {
  nodes: Node[];
  links: Relation[];
}

// 图表配置选项接口
export interface GraphOption {
  layout?: 'force' | 'circular' | 'none';
  showLabel?: boolean;
  showEdgeLabel?: boolean;
  draggable?: boolean;
} 